package com.wx.springboot.step9back.mapper;

import com.wx.springboot.step9back.model.Permission;
import com.wx.springboot.step9back.model.RolePermission;

import java.util.List;
import java.util.Map;

public interface PermissionMapper {
    List<Permission> getSelectList(Map<String, Object> data);

    int getSelectCount(Map<String, Object> data);

    Permission getPermissionById(Integer id);

    int addPermission(Permission permission);

    int updatePermission(Permission permission);

    int delPermission(Permission permission);

    int updateState(Permission permission);

    List<RolePermission> getPermissionByRoleId(Integer roleId);

    List<RolePermission> getPermissionItemByNoRoleId(Integer roleId);

    int addRolePermission(List<RolePermission> rolePermissions);

    int removeRolePermission(Map params);
}
